!--------------------------------------------------
! This module contains the paramers
!--------------------------------------------------
 module prmmirr
   implicit none

!------------------------------------------------------------------------------------------
   real(8):: pi, ln10
   real(8), parameter::              &
            Omega_m = 0.3d0          & ! $ \Omega_m = 0.3 
          , Lambda  = 0.7d0          & ! $ \Lambda  = 0.7 
          , c_cms   = 2.99792458d10  & ! $ speed of light cm/s
          , Mpc     = 3.08568025d24  & ! Mpc in cm
          , cH0     = 1.262d28       & ! $ c/H_0 = 1.262 10^{28}$ cm
          , n_0     = 410.5d0        & ! $ n_0 = 410.5$ cm$^{-3}$
          , T_0     = 2.725d0        & ! $ T_0 = 2.725 $ K 
          , k_B     = 8.61734315d-5  & ! $ k_B = 8.61734315d-5$ eV/K - Boltzmann constant
          , zeta3   = 1.20206d0      & ! $ Zeta[3] = 1.20206 $
          , kT0     = k_B*T_0        & ! $ kT0 = 2.348226d-4 $
          , ccmb    = n_0/zeta3        ! in cm$^{-3}$ 

!----------------------------------------------------
                    CONTAINS
!----------------------------------------------------  

!--------  Initialization -----------------------
  Subroutine InitParamMirr
     pi    = dacos(-1d0)     ! \pi	  
     ln10  = dlog(1d1)       ! ln(10) = 2.302585092
  end Subroutine InitParamMirr
!----------------------------------------------

!----------------------------------------------
! H(z) = H_0*dsqrt((1+z)^3*Omega_m + Lambda)
   real(8) Function RedShift(z1)
      implicit none
      real(8), intent(in) :: z1
      RedShift = dsqrt( z1*z1*z1*Omega_m + Lambda)
   end Function RedShift
!----------------------------------------------

!----------------------------------------------
!  Linear interpolation/extrapolation
   real(8) Function Flin(x,x1,x2,y1,y2)
      implicit none
	  real(8), intent(in):: x, x1, x2, y1, y2
	  Flin = y1 + (y2-y1)*(x-x1)/(x2-x1) 
   end Function Flin
!----------------------------------------------

 end module prmmirr
!=============================================================
